package Jiec.electiveol;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class ac_login extends Activity {
	private EditText username_edittext;
    private EditText password_edittext;
    private Button login_button;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);
        
        username_edittext = (EditText)findViewById(R.id.username_edit);
        password_edittext = (EditText)findViewById(R.id.password_edit);
        login_button = (Button)findViewById(R.id.login_button);
        login_button.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				dologin();
			}
		});
        
        
    }			
    private void dologin() {
    	String temp = WebServiceUtil.getPassword(username_edittext.getText().toString().trim());
    	password_edittext.setText(temp);
	}
}